Primary keys, foreign keys and other field values are easily passed from page to page via URL parameters
established with settings in the Bindings tab of the Properties dialog. Sometimes, however, you may need
to pass calculated values via URL parameters. For example, you might wish to pass the grand total of a table column on one page as an input value to another page:
http://MyApp/Page.aspx?Total= FreightGrandTotal.Text()
Or you might wish to pass the value of a dynamically retrieved session variable to a page:
http://MyApp/Page.aspx?Value=Session("Test")
You can do this with a code customization that overrides the ModifyRedirectUrl() method.
This example shows how to pass the grand total of a field column in a table is passed as a URL parameter when you redirect to another page from a button in a table panel.
Note, that you can assign the value of URL parameter or Session variable to any control on the page or use it in Query useing Formula. See Formula usage examples help.
You can also pass calculated field as a URL parameter when you redirect to a page from button in a record control. For this, you can use the code customization provided here.
However you have to move the code from table control class to record control class and modify it to pass your own calculated value.
This customization will be added in:
..\<Application Name>\<Table Name>\Show<Table Name>Table.aspx.cs
For example: C:\MyApp1\Orders\ShowOrdersTable.aspx.cs
|